package com.par1;

public class Main {
    public static void main(String[] args) {

        ChildImpl child = new ChildImpl();
        child.welcome();

        OveridingChild ovChild = new OveridingChild();
        ovChild.welcome();

        PgChild pgChild = new PgChild();
        pgChild.welcome();

        Grand.staticWelcome();
    }
}


interface Parent{

    public default void welcome() {
        System.out.println("welcome Parent........");
    }
}

interface Grand{
    public default void welcome() {
        System.out.println("welcome Grand........");
    }

    public static void staticWelcome(){
        System.out.println("welcome staticWelcome.......");
    }
}


class PgChild implements Parent,Grand{
    @Override
    public void welcome(){
        Parent.super.welcome();
        Grand.super.welcome();
    }
}


interface Child extends Parent{

}

class ParentImpl implements Parent{
    public void welcome(){
        System.out.println("welcome from Parent........");
    }
}

class OverridingParent extends ParentImpl{
    public void welcome(){
        System.out.println("welcome from ParentImpl........");
    }
}

class ChildImpl implements Child {

}

class OveridingChild extends OverridingParent implements Child{

}